home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / system / ms_sh22b.zip / dos4gw.doc next >
Text File  |  1993-12-01  |  12KB  |  300 lines

  1.         Configuring DOS/4GW
  2.  
  3. 1.  Introduction
  4.  
  5.     The DOS/4GW DOS extender, used by the 32-bit version of the shell, is a
  6.     royalty-free DOS extender from Rational Systems.  It must be placed in a
  7.     directory in %PATH.
  8.  
  9.     It is controlled by 3 environment variables:
  10.  
  11.     DOS4G    - Suppresses printout of DOS/4GW startup message.
  12.     DOS16M    - Controls how 32-bit memory is used and accessed.
  13.     DOS4GVM    - Enables and controls virtual memory.
  14.  
  15.  
  16. 2.  Suppressing the DOS/4GW Banner
  17.  
  18.     The banner that is displayed by DOS/4GW at startup can be suppressed by
  19.     setting the environment variable DOS4G to quiet.  The 32-bit version of
  20.     the shell does this automatically.
  21.  
  22.  
  23. 3.  Changing the Swtich Mode Setting
  24.  
  25.     In almost all cases, DOS/4GW programs can detect the type of machine
  26.     that is running and automatically choose an appropriate real to
  27.     protected mode switch technique.  For the few cases in which the
  28.     default setting does not work, the DOS16M environment variable allows
  29.     the user to override the default setting.  The DOS16M variable takes
  30.     values of the form:
  31.  
  32.      [<switch_mode>][@<start_address>[-<end_address>]][:<size>]
  33.  
  34.     The "<switch_mode>" value, which MUST be specified if you have an NEC
  35.     98-series, Fujitsu FMR-60,-70, Hitachi B32, or OKI if800 machine, can
  36.     take one of the following values:
  37.  
  38.     Value      Meaning
  39.        --------   -------------------------------------------------------------
  40.     0      Use DPMI to access 32-bit memory (automatically set if
  41.           present).
  42.     1      Use a method specific to the NEC 98-series machine.  You
  43.           MUST specify a start/stop range of memory to use.
  44.     2      Use a method specific to the PS/2 (automatically set if
  45.           necessary).
  46.     3      Use a method specific to a generic 386/486 machine
  47.           (automatically set if necessary).
  48.     INBOARD   Use a method specific for a 386 with an Intel Inboard
  49.           (automatically set if necessary).
  50.     5      Use a method specific to the Fujitsu FMR-70 machine.  You
  51.           MUST specify a start/stop range of memory to use.
  52.     11      Use VCPI to access 32-bit memory (automatically set if
  53.           present).
  54.     14      Use a method specific to the Hitachi B32 machine.  You
  55.           MUST specify a start/stop range of memory to use.
  56.     15      Use a method specific to the OKI if800 machine.  You MUST
  57.           specify a start/stop range of memory to use.
  58.     16      Use a method specific to PS/55s.  This setting may be needed
  59.           for some PS/55s, and note that this is NOT automatically
  60.           detected and used.
  61.  
  62.     Note that, for most machines, the correct value for "<switch_mode>" is
  63.     automatically detected and used.
  64.  
  65.  
  66. 3.1 Fine Control of Memory Usage
  67.  
  68.     The "<start_address>" and "<end_address>" values specify a range of
  69.     extended memory to use.  This is only necessary if neither DPMI nor
  70.     VCPI is available (these values are ignored if DMPI or VCPI is available).
  71.     Values can be specified as decimal or hexadecimal (prefixed with "0x"),
  72.     and are assumed to be values in kilobytes, unless an "M" (for "megabytes")
  73.     is appended to the end of the number.
  74.  
  75.     The "<size>" value specifies the maximum amount of memory that can be
  76.     allocated.  Values can be specified as decimal or hexadecimal (prefixed
  77.     with "0x"), and are assumed to be values in kilobytes, unless an "M"
  78.     (for "megabytes") is appended to the end of the number.
  79.  
  80.     If both a memory range ("<start_address"/"<end_address>") and a "<size>"
  81.     are given, the more restrictive of the two are used.
  82.  
  83.     Examples:
  84.  
  85.     set DOS16M=1@2m-4m    Mode 1, for NEC 98-series machines, and
  86.                 use extended memory between 2 and 4 MB.
  87.  
  88.     set DOS16M=:1M        Use the last full megabyte of extended
  89.                 memory, or as musch as available limited
  90.                 to 1MB.
  91.  
  92.  
  93.     set DOS16M=@2M        Use any extended memory above 2MB.
  94.  
  95.     set DOS16M=@0-5m    Use any available extended memory between 0
  96.                 (really 1) and 5 MB.
  97.  
  98.     set DOS16M=:0        Use no extended memory.
  99.  
  100.  
  101. 3.2 Using Extra Memory
  102.  
  103.     Some machines contain extra non-extended, non-conventional memory, just
  104.     below 16MB.  When running on a Compaq 386, DOS/4GW will automatically
  105.     use this memory because the memory is allocated according to a certain
  106.     protocol, which DOS/4GW follows. Other machines have no protocol for
  107.     allocating this memory.  To use the extra memory that may exist on
  108.     these machines, set DOS16M with the + option.
  109.  
  110.     set DOS16M=+
  111.  
  112.  
  113. 3.3 Setting Run-time Options
  114.  
  115.     The DOS16M environment variable sets certain runtine operions for all
  116.     DOS/4GW programs running on the same system.  To set the environment
  117.     variable, the syntax is
  118.  
  119.     DOS16M=[switch_mode_settings]^options
  120.  
  121.     These options are:
  122.  
  123.     0x01    Check the A20 line.  This option forces DOS/4GW to wait
  124.         until the A20 line is enabled for switching to protected
  125.         mode.  When DOS/4GW switches to real mode, this option
  126.         suspends your program's execution until the A20 line is
  127.         disabled, unless an XMS maanger is active.  If an XMS
  128.         manager is running, the program waits until the A20 line is
  129.         restored to the state it had when the CPU was last in real
  130.         mode.  Specify this option if you have a machine that runs
  131.         DOS/4GW, but is not truly AT-compatible.
  132.  
  133.     0x02    Prevent initialisation of VCPI.  By default, DOS/4GW
  134.         searches for a VCPI server and if one is present, forces
  135.         it on.  This option is useful if your application does not
  136.         use EMS explicitly, is not a resident program, and may be
  137.         used with 386-based EMS simulator software.
  138.  
  139.     0x04    Directly pass down keyboard status calls.  When this option
  140.         is set, status requests are passed down immmediately and
  141.         unconditionally.  When disabled, pass-downs are limited so
  142.         the 8042 auxiliary processor does not become overloaded by
  143.         keyboard polling loops.
  144.  
  145.     0x10    Restore only changed interrupts.  Normally, when a DOS/4GW
  146.         program terminates, all interrupts are restored to the
  147.         values they had at the time of program startup.  When you
  148.         use this option, only the interrupts changed by the DOS/4GW
  149.         program are restored.
  150.  
  151.     0x20    Set new memory to 00.  When DOS/4GW allocates a new segment
  152.         or increases the size of a segment, the memory is zeroed.
  153.         This can help you find bugs having to do with uninitialised
  154.         memory.  You can also use it to provide a consistent
  155.         working environment regardless of what programs were run
  156.         earlier.  This options only affects segment allocation or
  157.         expansions that are made through the DOS/4GW kernel, by DOS
  158.         functions 48H or 4AH.  This option does not affect memory
  159.         allocated with a compiler's malloc function.
  160.  
  161.     0x40    Set new memory to FF.  When DOS/4GW allocates a new segment
  162.         or increases the size of a segment, the memory is set to
  163.         0xFF bytes.  This can help you find bugs having to do with
  164.         uninitialised memory.  This options only affects segment
  165.         allocation or expansions that are made through the DOS/4GW
  166.         kernel, by DOS functions 48H or 4AH.  This option does not
  167.         affect memory allocated with a compiler's malloc function.
  168.  
  169.  
  170.     0x80    New selector rotation.  When DOS/4GW allocates a new
  171.         selector, it usually looks for the first available (unused)
  172.         selector in numerical order, starting with the highest
  173.         selection used when the program was loaded.  When this
  174.         option is set, the new selector search begins after the
  175.         last selector that was allocated.  This causes new
  176.         selectors to rotate through the range.  Use this option to
  177.         find references to stale selectors.
  178.  
  179.  
  180. 3.4 Controlling Address Line A20
  181.  
  182.     This section explains how DOS/4GW uses address line 20 (A20) and
  183.     describes the related DOS16M environment variable settings.  It is
  184.     unlikely that you will need to use these settings.
  185.  
  186.     Because the 8086/8 chips have a 20-bit address space, their highest
  187.     addressable memory location is 0xfffff.  If you specify an address of
  188.     0x100000 or greater, which would require the twenty-first bit to be
  189.     set, the address is wrapped round to zero.  Some parts of DOS depend on
  190.     this wrap, so on the 802/386, the twenty-first address bit is disabled.
  191.     TO address extended memory, DOS/4GW enables the twenty first bit (the
  192.     A20 line).  The A20 line must be enabled for the CPU to run in
  193.     protected mode, but it may either be enabled or disabled in rea